package com.youhong.teethcare.dialogs;

import android.app.Dialog;
import android.content.Context;
import android.media.MediaPlayer;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.youhong.teethcare.R;
import com.youhong.teethcare.services.Common;

/**
 * Created by Administrator on 2018/5/18 0018.
 */
public class ChargeNotificationDialog extends Dialog implements View.OnClickListener {
    public ChargeNotificationDialog(@NonNull Context context,Runnable runnable_close) {
        this(context, R.style.dialog_chargeNotification);
        run_close = runnable_close;
    }

    Runnable run_close;
    ImageView iv_close;

    public ChargeNotificationDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);

        setContentView(R.layout.dialog_charge_notification);
        iv_close = findViewById(R.id.chargeNotification_iv_close);
        iv_close.setOnClickListener(this);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();


    }

    @Override
    public void onClick(View v) {

        if (v == iv_close) {

            this.dismiss();
            run_close.run();;
        }
    }
}
